package com.csxh.web.user.service;

import com.csxh.web.user.bean.User;
import com.csxh.web.user.dao.UserDao;

public class UserService {

	public User findOneByEmail(String userEmail,String password){
		//业务层代码
		//数据层代码
		UserDao dao=new UserDao();
		User u=dao.findOne(User.class,"`email`=?",userEmail);
		//业务层代码
		if(null!=u && password.trim().equals(u.getPassword())){
			return u;
		}else{
			return null;
		}
	}
}
